DECLARE @T FLOAT
SET @T = (SELECT SUM(CAST (DATE_TO - DATE_FROM AS float)) FROM TB_RENTAL)
SELECT M.MANUFACTURER
    ,ROUND(100*SUM(CAST(R.DATE_TO - R.DATE_FROM AS float)) / @T,2)
FROM TB_RENTAL R, TB_CAR C, TB_CAR_MODEL CM, TB_MANUFACTURER M
WHERE R.CAR_ID = C.ID AND C.CAR_MODEL_ID = CM.ID AND CM.ID_MANUFACTURER = M.ID
GROUP BY M.MANUFACTURER




